<!--
// +----------------------------------------------------------------------
// | Created by PHPstorm: JRKAdmin框架 [ JRKAdmin ]
// +----------------------------------------------------------------------
// | Copyright (c) 2019~2022 [LuckyHHY] All rights reserved.
// +----------------------------------------------------------------------
// | SiteUrl: http://www.luckyhhy.cn
// +----------------------------------------------------------------------
// | Author: LuckyHhy <jackhhy520@qq.com>
// +----------------------------------------------------------------------
// | Date: 2020/3/14 0014-15:54
// +----------------------------------------------------------------------
// | Description:
// +----------------------------------------------------------------------
*-->

{extend name='public/window' /}


{block name="content"}

<div class="layui-fluid">
    <div class="layui-card">

        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="" lay-filter="component-form-group">


                <div class="layui-form-item">
                    <label class="layui-form-label label-required-next">配置项名：</label>
                    <div class="layui-input-block input-custom-width" style="">
                        <input type="text" name="key" value="" placeholder="请输入配置项名" lay-verify="required" lay-vertype="tips" lay-reqtext="请输入配置项名" autocomplete="off" class="layui-input ">
                        <p class="help-block">配置项名只允许英文字母！！！</p>
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label label-required-next">配置项值：</label>
                    <div class="layui-input-block input-custom-width" style="">
                        <input type="text" name="value" value="" placeholder="配置项值"  lay-verify="required" lay-vertype="tips" lay-reqtext="请填写配置项值" autocomplete="off" class="layui-input ">
                        <p class="help-block">配置项值不能为空！</p>
                    </div>
                </div>

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">配置描述：</label>
                    <div class="layui-input-block input-custom-width">
                        <textarea name="desc" placeholder="请输入配置描述" class="layui-textarea"></textarea>
                    </div>
                </div>

                {:widget('common/forms/submit',array('add','立即提交',2))}

            </form>
        </div>
    </div>
</div>



<script>
    layui.use(['element', 'form', 'jquery','IconFonts','lucky'], function () {
        var element = layui.element;
        var table = layui.table;
        var form = layui.form;
        var $ = layui.jquery;
        var IconFonts = layui.IconFonts;
        var lucky=layui.lucky;

        form.on('submit(add)', function (data) {
            lucky.FormSubmit("{:url('setting/addSet')}",data.field,"table_id",1);

            return false;
        });
    })
</script>

{/block}
